package cn.eeepay.framework.dao.workOrder;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface WorkReadDao {

    @Select(
            "select count(*) from work_order wo " +
                    " INNER JOIN agent_info ai  ON ai.agent_node=wo.receive_agent_node" +
                    " where ai.one_level_id=#{agentNo} and wo.status!='4' "
    )
    int agentCountWork(@Param("agentNo") String agentNo);

    @Select(
            "select count(*) from work_order wo " +
                    " INNER JOIN agent_info ai  ON ai.agent_node=wo.receive_agent_node" +
                    " where ai.one_level_id=#{agentNo} and wo.status!='4' and wo.deal_result='4' "
    )
    int agentCountWorkUntreated(@Param("agentNo") String agentNo);
}
